<html>
    <head>
        <title>dakk Delegate Pool</title>
        <link href="https://bootswatch.com/3/flatly/bootstrap.min.css" rel="stylesheet">
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
        <script src="app.js"></script>
    </head>
    <body ng-app="delegateApp" ng-controller="indexCtrl">
        <div class="container">
            <h1>dakk Delegate Pool (<a href="https://explorer.lisk.io/address/2324852447570841050L" target="_blank">Explorer</a>, <a href="https://forum.lisk.io/viewtopic.php?f=48&t=1094" target="_blank">Proposal</a>)</h1>
            <div class="alert alert-info" role="alert">Sharing weekly 15% of forged amount to voters; vote for delegate dakk to receive a reward in the next week.</div>

            <div class="row">
                <div class="col-md-4">
                    <div class="alert alert-success" role="alert">Last payout: {{lastpayout|date}}</div>
                </div>
                <div class="col-md-8">
                    <div class="alert alert-success" role="alert">Next payout will be at: {{nextpayout|date}}</div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-4">
                    <div class="alert alert-info" role="alert">Rank: {{delegate.rank}}</div>
                </div>
                <div class="col-md-4">
                    <div class="alert alert-danger" role="alert">Productivity: {{delegate.productivity}}</div>
                </div>
                <div class="col-md-4">
                    <div class="alert alert-warning" role="alert">Approval: {{delegate.approval}}</div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-6">
                    <div class="alert alert-success" role="alert">Total paid: {{total.paid|number:8}} LSK</div>
                </div>
                <div class="col-md-6">
                    <div class="alert alert-danger" role="alert">Total pending: {{total.pending|number:8}} LSK</div>
                </div>
            </div>

            <table class="table table-striped table-hover table-bordered">
                <thead>
                    <tr>
                        <th>Address</th>
                        <th>Paid (LSK)</th>
                        <th>Pending (LSK)</th>
                </thead>
                <tbody>
                    <tr ng-repeat="acc in (accounts|orderBy:'-received')">
                        <td>{{acc.address}}</td>
                        <td>{{acc.received|number:4}}</td>
                        <td>{{acc.pending|number:4}}</td>
                    </tr>
                </tbody>
            </table>
            
            <hr>
            <div align="center">
	            This software is free software created by Davide Gessa<br>
	            <a href="https://github.com/dakk/lisk-pool">Fork me on Github</a>
	        </div>
        </div>
    </body>
</html>
